package com.siteseat.crudeq.common.raw;

/**
 *
 */
public interface Constants {

  public static final int    DEFAULT_RESERVE_HOURS    = 24 * 30;

  public static final int    DEFAULT_CHUNK_SIZE_BY_KB = 16 * 1024;                 // 16MB

  public static final int    MAX_CHUNK_SIZE_BY_KB     = 2 * 1024 * 1024;        // dont'
                                                                                    // try
                                                                                    // to
                                                                                    // set
                                                                                    // it
                                                                                    // greater
                                                                                    // value

  public static final String CHUNK_FILE_EXTENSION     = "crudeq";

  public static final String CHUNK_FILE_DOT_EXTENSION = "." + CHUNK_FILE_EXTENSION;

  /**
   * 
   *
   */
  public static interface MESSAGE {
    public static final byte magic    = 0x37;
    
    public static final int HEADER_SIZE  = OFFSET.TIMESTAMP + 8;

    public static final int MINIMAL_SIZE = HEADER_SIZE;

    public static interface OFFSET {
      public static final byte MAGIC    = 0;
      
      public static final int SIZE      = 1;

      public static final int TIMESTAMP = 5;
      
      public static final int PAYLOAD = HEADER_SIZE;
    }
  }
}